
import React, { Component } from 'react';
import {
  StyleSheet,
  View,
  Text,
  Image,
  ActivityIndicator,
  Dimensions,
  TouchableHighlight
} from 'react-native';

const { width, height } = Dimensions.get('window');

const infowidth=7*width/10
const imgwidth=1*width/10

import {
    StackNavigator,
    TabNavigator,
  } from 'react-navigation';

class Personal extends Component {
  static navigationOptions = {
    title: '个人中心',
    headerTitleStyle: {
        alignSelf:'center'
      },
      headerStyle:{
        height:45
      },
    tabBarLabel: '个人中心',
    tabBarPosition:'bottom',
    tabBarIcon: () => (
      <Image
        source={require('../img/people.png')}
        style={styles.icon}
      />
    ),
  };
  render() {
    return (
      <View >

      <View style={styles.topshow}>
      <Image source={require('../img/zhangdan.png')}
        style={styles.headimg}/>
        <View style={styles.logininfo}>
        <Text style={styles.sname}>名义餐厅（老板）</Text>
        <Text>登录账号：18341323671</Text>
        </View>
        </View>

        <TouchableHighlight>
        <View style={styles.contentshow}>
        <Image source={require('../img/zhangdan.png')}
        style={styles.smallimg}/>
        <Text style={styles.center}>我的订单</Text>
        </View>
        </TouchableHighlight>

        <View style={styles.topshow}>
        <Text style={styles.center}>切换登录</Text>
        </View>
      </View>
      
    );
  }
}


var styles=StyleSheet.create({
   topshow:{
     marginTop:20,
     backgroundColor:'white',
     paddingTop:10,
     paddingBottom:10,
     flexDirection:'row',
     justifyContent:'space-around',
     alignItems:'center'
   },
   contentshow:{
     marginTop:10,
     paddingTop:10,
     paddingRight:'50%',
     paddingBottom:10,
     backgroundColor:'white',
     flexDirection:'row',
     justifyContent:'space-around',
     alignItems:'center'
   },
   headimg:{
     width:imgwidth,
     height:imgwidth
   },
   smallimg:{
     width:23,
     height:23
   },
   logininfo:{
     width:infowidth
   },
   sname:{
     fontSize:17,
     paddingBottom:5,
     color:'black'
   },
   center:{
     textAlign:'center',
     fontSize:17
   },
   icon:{
     width:30,
     height:30
   }
})


  export default Personal